#include "StdAfx.h"
#include "ChannelPool.h"


static void InitChannelPage(ChannelPage *page){	
	for(int i = 0;i < CHANNEL_PAGE_SIZE;++ i){
		page->push_back(new Channel());
	}
}
ChannelPool::ChannelPool(void) : m_pageIndex(0)
{
	InitChannelPage(&m_page0);
	InitChannelPage(&m_page1);
	InitChannelPage(&m_page2);
	
	m_pages[0] = &m_page0;
	m_pages[1] = &m_page1;
	m_pages[2] = &m_page2;	
}

ChannelPool::~ChannelPool(void)
{
}

ChannelPool g_channelPool;